/**
 * Fuzzy Refrigerator: Refrigerator with Fuzzy Logic as temperature controller
 * Copyright (C) 2012  Izwan Azmi
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

 /**
  * @file fuzzy.h
  * @brief
  * @author Izwan Azmi <izwanazmi90@gmail.com>
  */

#ifndef FUZZY_H
#define FUZZY_H

typedef enum {biasa, kiri, kanan} jenis_trapz;
typedef enum {AND, OR} operator_logik;

typedef struct {
	jenis_trapz jt;
	float a, b, c, d, cerun_kiri, cerun_kanan;
} trapezoid;

class fuzzy
{
    public:
        fuzzy();
        virtual ~fuzzy();
    protected:
        trapezoid init_trapz(float, float, float, float, jenis_trapz);
        float fuzzification(float, trapezoid);
        float getMin(float [], int);
        float getMax(float [], int);
    private:
};

#endif // FUZZY_H
